package com.mofang.powerdekorhelper.adapter;

import android.content.Context;

import com.mofang.powerdekorhelper.R;
import com.mofang.powerdekorhelper.base.recycleview.BaseRecycleViewAdapter;
import com.mofang.powerdekorhelper.base.recycleview.BaseViewHolder;
import com.mofang.powerdekorhelper.model.PastActivityList;

import java.util.List;

/**
 * Created by luofei on 2017/8/31 0031.
 * 说明：
 */

public class PastActivityListAdapter extends BaseRecycleViewAdapter {

    public PastActivityListAdapter(List<?> data, Context mContext, int layoutId) {
        super(data, mContext, layoutId);
    }

    @Override
    protected <T> void convert(BaseViewHolder holder, T bean, int position) {

        PastActivityList.Data data = (PastActivityList.Data) bean;

        holder.setImage(R.id.past_activity_imv, data.getImgurl(), R.mipmap.list_defaut_bg);
        holder.setText(R.id.past_activity_name, data.getName());

        holder.itemView.setTag(data);
    }
}
